Explainable and automated decisions in computer-based reasoning systems

ABSTRACT

The techniques herein include using an input context to determine a suggested action. One or more explanations may also be determined and returned along with the suggested action. The one or more explanations may include (i) one or more most similar cases to the suggested case (e.g., the case associated with the suggested action) and, optionally, a conviction score for each nearby cases; (ii) action probabilities, (iii) excluding cases and distances, (iv) archetype and/or counterfactual cases for the suggested action; (v) feature residuals; (vi) regional model complexity; (vii) fractional dimensionality; (viii) prediction conviction; (ix) feature prediction contribution; and/or other measures such as the ones discussed herein, including certainty. In some embodiments, the explanation data may be used to determine whether to perform a suggested action.

PRIORITY CLAIM

The present application is a continuation of U.S. application Ser. No.16/205,373 having a filing date of Nov. 30, 2018, which claims thebenefit of U.S. Provisional Application 62/760,696 filed Nov. 13, 2018and U.S. Provisional Application 62/760,805 filed. Nov. 13, 2018.Applicant claims priority to and the benefit of each of suchapplications. Applicant incorporates U.S. Provisional Application62/760,696 herein by reference in its entirety.

FIELD OF THE INVENTION

The present invention relates to computer-based reasoning systems andmore specifically to explainability and decisions in computer-basedreasoning systems.

BACKGROUND

Machine learning systems can be used to predict outcomes based on inputdata. For example, given a set of input data, a regression-based machinelearning system can predict an outcome. The regression-based machinelearning system will likely have been trained on much training data inorder to generate its regression model. It will then predict the outcomebased on the regression model.

One issue with current systems is, however, that those predictedoutcomes appear without any indication of why a particular outcome hasbeen predicted. For example, a regression-based machine learning systemwill simply output a predicted result, and provide no indication of whythat outcome was predicted. When machine learning systems are used asdecision-making systems, this lack of visibility into why the machinelearning system has made its decisions can be an issue. For example,when the machine learning system makes a prediction, which is then usedas part of a decision, that decision is made without knowing why themachine learning system predicted that particular outcome based on theinput. When the prediction or subsequent decision is wrong, there is noway to trace back and assess why the prediction was made by the machinelearning system.

The techniques herein overcome these issues.

The approaches described in this section are approaches that could bepursued, but not necessarily approaches that have been previouslyconceived or pursued. Therefore, unless otherwise indicated, it shouldnot be assumed that any of the approaches described in this sectionqualify as prior art merely by virtue of their inclusion in thissection.

SUMMARY

The claims provide a summary of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

In the drawings:

FIG. 1 is a flow diagram depicting example processes for explainable andautomated decisions in computer-based reasoning systems.

FIG. 2 is a block diagram depicting example systems for explainable andautomated decisions in computer-based reasoning systems.

FIG. 3 is a block diagram of example hardware for explainable andautomated decisions in computer-based reasoning systems.

FIG. 4 is a flow diagram depicting example processes for controllingsystems.

DETAILED DESCRIPTION

In the following description, for the purposes of explanation, numerousspecific details are set forth in order to provide a thoroughunderstanding of the present invention. It will be apparent, however,that the present invention may be practiced without these specificdetails. In other instances, well-known structures and devices are shownin block diagram form in order to avoid unnecessarily obscuring thepresent invention.

General Overview

The techniques herein provide for explainable and automated decisions incomputer-based reasoning systems. In some embodiments, thecomputer-based reasoning is a case-based reasoning system. In case-basedreasoning systems, in some embodiments, an input context may be used todetermine a suggested action. The input context may have multiplefeatures and those features may be used to find the “most similar” caseor cases in the case-based reasoning model. “Similarity” may bedetermined using a premetric, as discussed elsewhere herein. In someembodiments, a single most similar case, multiple similar cases, or acombination of multiple similar cases can be returned as a suggestedaction or actions.

In addition to the suggested action, explanation data may also bedetermined and returned with the suggested action. The explanation datamay include, in some embodiments, a certainty score, such as aconviction score for the suggested action. The certainty score may bedetermined in numerous ways, such as those discussed herein. Theexplanation data may also (or instead) include (i) one or more mostsimilar cases to the suggested case (e.g., the case associated with thesuggested action) and, optionally, a conviction score for each nearbycases; (ii) action probabilities, (iii) excluding cases and distances,(iv) archetype and/or counterfactual cases for the suggested action; (v)feature residuals; (vi) regional model complexity; (vii) fractionaldimensionality; (viii) prediction conviction; (ix) feature predictioncontribution; and/or other measures such as the ones discussed herein.In some embodiments, the explanation data may be used to determinewhether to perform a suggested action.

Example Process for Explainable and Automated Decision Making inComputer-Based Reasoning Systems

FIG. 1 is a flow diagram depicting an example process for explainableand automated decisions in computer-based and case-based reasoningsystems. Generally, process 100 begins by receiving 110 a request for asuggested action. Numerous examples of requests for suggested action aredescribed herein. After the request for a suggested action has beenreceived 110, a determination 120 is made for one or more suggestedcases. The request for a suggested action received 110 may include aninput context that can be used to determine 120 one or more suggestedcases (e.g., for use in control of a system). Each of the one or moresuggested cases may be associated with an action. As such, determining120 one or more suggested cases may also include determining 120 one ormore suggested actions to be taken. A machine learning systems mightsimply stop at 120 and provide the one or more suggested actions (e.g.,for control of a system). Techniques herein, however, includedetermining 130 a suggested action and determining 140 explanation datarelated to the suggested action. For example, after determining 120suggested cases, which includes suggested actions, a suggested actionmay be determined based on the one or more suggested actions.Determining 130 a suggested action may be accomplished by any of thetechniques described herein, including combining the suggested actionstogether to form a new suggested action, picking one of the suggestedactions to be the suggested action, and the like. After determining 130a suggested action based on the one or more suggested actions,explanation data may be determined 140. Explanation data may take manyforms, including conviction scores, certainty measures, similaritymeasures, prototype identity, distance measures, such as distance to thenearest contrary case, and the like. After determining 140 theexplanation data and determining 130 the suggested action, a response150 may be sent with the suggested action and the explanation.

A determination 160 may be made based on the explanation data whether tocause the performance of the suggested action and/or provide anexplanation in response to the request. If the determination 160 made onthe explanation data indicates 170 that performance should be caused,then performance of the suggested action is caused 190. Causingperformance of the suggested action may include controlling a real worldsystem, such as a self-driving car or any of the other examplesdiscussed herein. If the determination 160 does not indicate 170performance of the suggested action, then the explanation data may beprovided 180 along with the suggested action related to the explanationdata. In some embodiments, the suggested action may still be performed,a different action may be performed, or not action may be performed aspart of performing 181.

Conviction Examples

Returning to the top of process 100, a request may be received 110 for asuggested action to be taken. Receiving 110 the request for a suggestedaction may take many forms, such as an API call, a remote procedurecall, activating a motor or other actuator, setting a voltage, receivingdigital information via http, https, ftp, ftps, and/or the like. Theformat of the request may be any appropriate format, including anindicator that an action is being requested, and the context in whichthe action is being requested.

After an input context is received 110, a case-based reasoning systemmay be queried based on the provided context as part of the request inorder to determine 120 one or more candidate cases. In some embodiments,determining 120 the one or more candidate cases may include comparingthe input context in the received 110 request to the elements in acase-based reasoning model. In some embodiments, this received 110context is called the input context, or the current context. In someembodiments, the input context is compared to cases in the case-basedreasoning model. The cases that are most similar to the input context,may be used as the candidate cases. In some embodiments, the number ofcandidate cases to determine may be any appropriate number including 1,2, 5, 10, etc. The number of candidate cases may also be a function ofthe number of cases in the model (e.g., a percentage of the model). Insome embodiments, the candidate cases may be determined as those withina certain threshold distance of the input context (e.g., as measured bya distance measure or other premetric, such as those discussed herein).

In some embodiments, determining 120 one or more candidate cases basedon the input context may include determining a region around the inputcontext and determining the most similar one or more cases that areoutside of that region. For example, the cases that are within a regionmay be those cases that are within a certain distance (for example,using one of the distance measures discussed herein). The region may bedefined, in some embodiments, as the most similar N cases, the mostsimilar P percent of the model. In some embodiments, the region may bealso based on a density measure. In some embodiments, the region may bedefined as a function of density. For example, the density of casesaround the input context may be above a certain threshold density and asyou move away from the input context, the density of cases may drop, andupon dropping that may define the boundary of that region. Once thatregion around the input context is determined, then the one or morecandidate cases are determined 120 as those most similar to the inputcontext while being outside the region.

If only a single candidate action is determined 120, then that candidateaction may be determined 130 as the suggested action. If multiplecandidate actions are determined 120, then any appropriate technique canbe used to determine 130 the suggested action based on those two or morecandidate actions. For example, if the candidate cases all have the samecandidate actions, then that (identical among the candidate cases)candidate action may be used as a suggested action. If the candidateactions in the candidate cases previously determined 120 are different,then another mechanism may be used, such as voting among the candidateactions, taking the candidate action that appears most often,determining an arithmetic mean or mode of the candidate actions,harmonic mean, inverse distance weighted mean (e.g., where the weightsare based on distance of the related context to the input context, basedon conviction, etc.), Lukaszyk-Karmowski metric weighted mean, kernelmethods, fisher kernels, radial basis function, and/or the like. In someembodiments, determining the suggested action may include choosing basedon the candidate cases and action using feature weights. The featureweights may be chosen based on conviction of the features, or any otherappropriate mechanism. Further, the candidate actions in the candidatecases previously determined 120 may be used to determine if any actionis taken, for example, the action may not be taken unless all of thecandidate actions are equal, within some threshold of each other (e.g.,as measured by distance or similarity), meet the criteria of a diversityor variance measure, if any action values in the candidate set are equalto specific values, if any action values in the candidate set areoutside of specified bounds, etc. For example, in some embodiments,determining 130 a suggested action based on the respective one or morecandidate actions includes determining a weighting for each action ofthe respective one or more candidate actions based on a function of adistance between the input context and each of the one or more candidatecases. The suggested action may then be determined 130 based on theweighting of each action of the respective one or more candidateactions. The weighting for each candidate action may be, as noted above,based on the distance between that candidate action and the inputcontext. Any appropriate distance metric or premetric may be used,including Euclidean distance, Minkowski distance, Damerau-Levenshteindistance, Kullback-Leibler divergence, 1—Kronecker delta, and/or anyother distance measure, metric, pseudometric, premetric, index, and thelike.

Explanation data is determined 140 related to the suggested action. Forexample, in some embodiments, a certainty score may be determined 140for the suggested action. In some embodiments, determining the certaintyscore for the suggested action may be accomplished by removing thesuggested case from the case-based reasoning model and determining aconviction measure associated with adding the suggested case back intothe case-based reasoning model. Numerous examples of certainty measuresand conviction functions are discussed elsewhere herein. In someembodiments, as depicted in FIG. 1, the suggested action may bedetermined 130 before the explanation data is determined 140.Embodiments also include determining 130 and 140 the suggested actionand the explanation data simultaneously or determining 140 theexplanation data before determining 130 the suggested action.

After the certainty score has been determined 140, the suggested actionand the certainty score may be sent in response 150 to the originalrequest for a suggest action. When the certainty score is determined 160as being beyond a certain threshold, a decision 170 is made to cause 190control of a system based on the suggested action. For example, if thecertainty score is above a certain threshold, then a controlled systemmay be confident that the suggested action should be performed withoutfurther review or explanation. As such, when that certainty score isabove that threshold, the control of the system may be caused 190 basedon that suggested action. Controlling a system based on suggested actionis explained in detail elsewhere herein. As one example, if a certaintyscore for a suggested action for a self-driving car is above a certainthreshold, then that action may be performed for the self-driving car.

When the certainty score for a suggested action is determined 160 to notbe beyond a certain threshold, then a decision 170 is made to determineand provide 180 one or more explanation factors for the suggestedaction. For example, the explanation factors may include the certaintyscore. In some embodiments, additional explanation factors, such asthose discussed herein, may be determined and provided 180. Further,when the certainty score is not beyond a certain threshold, the one ormore explanation factors may be provided 180 in response to the originalrequest for a suggested action, to the original requestor (in additionto or instead of the suggested action). For example, if the certaintyscore is not beyond a certain threshold, then the certainty score andthe suggested action may both be provided to a human operator of therequesting system, who may then review the suggested action and thecertainty score in order to determine what action to take next. Asdepicted in FIG. 1, the system may optionally perform 181 an actionbased on the suggested action and/or the explanation. For example, if ahuman operator of a self-driving car is provided with a suggested actionfor the self-driving car and the certainty score, which is below acertain threshold, that human operator may decide to continue to performthe suggested action, perform a different action, or no action at all.

Feature Range Examples

Returning to determining 140 explanation date, in some embodiments,determining 140 the one or more explanation factors may includedetermining a regional model of two or more cases in the case-basedreasoning model near the suggested case (e.g., as the nearest N cases,the nearest P percent of cases, the nearest cases before a densitydifferential, etc., as discussed elsewhere herein). In some embodiments,a regional model is called a “case region.” For each feature in theinput context, a determination may be made whether a value for thatfeature is outside the range of values for the corresponding feature inthe cases in the regional model. In some embodiments, a determinationcan then be made whether to automatically cause 190 performance of thesuggested action. The suggested action may be performed if there are nofeatures outside the range of the corresponding features in the regionalmodel, if there are smaller than a certain number of features outsidethe regional model, and/or the features do not differ by more than athreshold amount (either percentage or fixed threshold) than the rangeof the corresponding feature in the regional model. If the determinationis made to automatically perform the suggested action, then the systemmay cause 190 performance of the suggested action. If the determinationis made not to automatically perform the suggested action, then anyinput features that are outside the range of values for thecorresponding features in the case of the regional models may beprovided 180 as one of the one or more explanation factors. For example,if there are a number of cases around the suggested case, and the inputcontext has one or more features outside of the range of values for thatregional model that may be important for a human operator to know inorder to decide whether or not to perform 181 the suggested action, adifferent action, or no action at all.

Action Probability Examples

In some embodiments, the one or more candidate actions include two ormore candidate actions. Returning to determining 140 explanation data,in some embodiments, action probabilities for each of the two or morecandidate actions may be determined 140. In some embodiments, thecandidate actions are categorical, and the action probabilities arecategorical action probabilities of each action in the set of two ormore candidate actions can be determined. For example, if all of thecandidate actions are the same action (e.g., Action A), then thecategorical action probability of Action A is 100% because all ofcandidate actions are Action A. In some embodiments, if the candidateactions differ, then the categorical action probabilities may bedetermined based on the number of times that each action appears in thecandidate actions. For example, if there are nine suggested actions andthose actions are (A, B, C, A, B, B, A, A, A) then the categoricalaction probability for Action A would be (# of A/# total)=55.6%(rounded), for Action B would be (# of B/# total)=⅓ or 33%, and forAction C would be (# of C/# total)=11.1% (rounded). In some embodiments,determining a categorical action probability may also or instead be afunction of the distance of each suggested action to the input context.Using the same example, but shown as a tuple of candidate action anddistance, those actions may be (A 1.1; B 1.2; C 1.2; A 1.4; B 1.5; B1.6; A 1.4; A 1.4; A 1.9). In some embodiments, the equation used todetermine the weighted categorical action probability may be, for eachcandidate action category, the sum of the inverse of the distances forthat categorical action probability divided by the sum of the inverse ofall distances. In the example, the categorical action probabilitieswould be, for Action A,(1/1.1+1/1.4+1/1.4+1/1.4+1/1.9)/(1/1.1+1/1.2+1/1.2+1/1.4+1/1.5+1/1.6+1/1.4+1/1.4+1/1.9)or approximately 54.7%, for Action B(1/1.2+1/1.5+1/1.6)/(1/1.1+1/1.2+1/1.2+1/1.4+1/1.5+1/1.6+1/1.4+1/1.4+1/1.9)or approximately 32.5%, and for Action C(1/1.2)/(1/1.1+1/1.2+1/1.2+1/1.4+1/1.5+1/1.6+1/1.4+1/1.4+1/1.9) orapproximately 12.7%.

In some embodiments, the action may include continuous or ordinal (e.g.,non-categorical, and/or not a nominal or ordinal) values and the actionprobability for each value is determined based on the confidenceinterval of the suggested actions for a given tolerance. For example,the action probability of an action value of 250 may have a 67%probability of being within +/−5 of 250. For actions that includemultiple values, the probability may be given per pair of value andtolerance or as the probability of all of the values being within of allof the tolerances.

These action probabilities may be provided in response 150 to therequest for a suggested action. Further, the action probability for thesuggested action may be compared to a threshold. When the actionprobability for the suggested action is beyond that certain threshold(e.g., above 25%, 50%, 90%, etc.), control of a system may be caused 190based on the suggested action. For example, if the action probability ofthe suggested action is high, then a system may be confident thatperforming the suggested action without further review is proper. On theother hand, if the action probability of the suggested action is low,then performing the suggested action may not necessarily be proper. Assuch, when the action probability is not beyond the certain threshold,then one or more explanation factors for the suggested action may bedetermined and provided 180 in response to the suggested action. Thesemay be in addition to or instead of other explanation factors discussedelse herein. Further, the action probabilities comparison to thethreshold may be performed along with, in addition to, or instead of,other comparisons or controls discussed herein. For example, a decisionto cause 190 the performance of the suggested action may be made basedon both or either the certainty score being above a first thresholdand/or the action probability of the suggested action being above asecond threshold.

Excluding Cases Examples

Returning to determining 120 the one or more candidate cases, in someembodiments, cases within a certain range of the input context may bedetermined and excluded from the candidate cases, as discussed elsewhereherein (e.g., those cases within a certain distance of the inputcontext, the most similar N cases, the most similar cases that are Ppercent of the model, or those chosen for exclusion based on a densitycalculation). Then those cases most similar to the input context,outside of the excluded cases, may be used as the candidate cases. Then,in some embodiments, a distance measure from the input context to theone or more candidate cases may be determined 140. When that distancemeasure from the input context to the one or more candidate cases iswithin a certain threshold, control of a system may automatically becaused 190 (as discussed elsewhere herein). For example, when,notwithstanding that certain more similar cases have been excluded, thenext most similar case is still within a certain threshold, then thesystem may be confident in performing the suggested action. When thedistance from the input context to the one or more candidate cases isbeyond the certain threshold, however, then one or more explanationfactors may be determined and provided 180 in response to the requestfor the suggested action. For example, when the distance to thecandidate cases, having excluded the more similar cases, is beyond thecertain threshold, then explanation factors may be determined andprovided 180 in response to the request for a suggested action. Theexplanation factors may include the distance(s) calculated, thecandidate cases, and the like. In providing these explanation factors, ahuman operator may be able to review that the candidate cases werebeyond a certain threshold. This may be useful information for the humanoperator to review in order to determine whether to perform thesuggested action, perform a different action, or perform no action atall.

Counterfactual Examples

Returning to determining 140 explanation data for the suggested action,in some embodiments, one or more counterfactual cases may be determined140 based on the suggested action and the input context. In someembodiments, determining 140 the counterfactual cases may include, foractions which are ordinals or nominals, determining 140, as thecounterfactual cases, one or more cases with actions different from thesuggested case that are most similar to the input context (e.g., basedon a distance measure between contexts or contexts & action(s), such asthose discussed herein). For example, if the suggested action is for aself-driving car to turn left (as opposed to other actions, like“continue straight”, “turn right”, etc.), and the most similar case witha different suggested action, for example, stay in the same lane, isdetermined, then that case may be the counterfactual case. In someembodiments, more than one counterfactual case may be determined.

In some embodiments, more than one counterfactual case may bedetermined. For example, the most similar few cases with the samecounterfactual action may be determined. Additionally, in someembodiments, the most similar case with each of multiple differentactions may be determined. For example, returning to the self-drivingcar example, the most similar case that would “continue straight” may bedetermined, as well as the most similar case that would “turn right”could be determined as the two or more counterfactual cases.

In some embodiments, determining the one or more counterfactual cases,such as for actions that are continuous variables, may includedetermining one or more cases that maximize a ratio of a function of thedistance to the suggested action space and a function of the distance tothe input context in the context space. Specific examples of functionsmay include, in some embodiments, the counterfactual case(s) may be theones that maximize the (distance in action space from the suggestedaction to the counterfactual action)/(distance in context space from thesuggested case's context); (distance in action space−suggested tocounterfactual)/(distance in action+context space−suggested tocounterfactual); a logistic function based on the aforementioned actiondistance to context distance or action and context distance to contextdistance; and the like.

Further, the distance from the input context of the one or morecounterfactual cases may be determined 140. If there is a singlecounterfactual case determining the distance to the counterfactual caseusing one of the distance measures or pre-metrics discussed herein. Ifthere are two or more counterfactual cases, then the distance of each ofthose to the input context may be determined and used as an aggregatedistance for comparison to a threshold. For example, the maximum of thetwo distances, the minimum of the two or more distances, the average ofthe two or more distances, or the like may be used. After determining140 the one or more counterfactual cases and distance measuresassociated with those cases, those counterfactual cases and distancesmay be returned in response 150 to the request for a suggested actionalong with the suggested action, and any other explanation data, such asthat discussed herein. When the distance from the input context to theone or more counterfactual cases is determined 160 to be beyond acertain threshold, the system may cause 190 control of a real-worldsystem based on the suggested action. For example, if counterfactualcases are distant (e.g., beyond a certain threshold), then a system maybe confident in performing the suggested action. When the distance fromthe input context to the one or more counterfactual cases is below acertain threshold, however, one or more explanation factors may bedetermined and provided 180 in response to the request for a suggestedaction. For example, the explanation factors may include the distancedetermined, and/or the one or more counterfactual cases.

Archetype Examples

Returning to determining 140 explanation data, in some embodiments,determining 140 explanation data may include determining 140 one or morearchetype cases based on the suggested action. Determining 140 anarchetype case may include determining a first set of cases withidentical actions to the suggested action and a second set of cases withdifferent actions from the suggested action. Then determining the one ormore archetype cases as the first set of cases that are farthest fromthe set of cases in the second set of cases. For example, if there are10 cases with the same action as the suggested action and there are 100cases with a different action than the suggested action, then the casein the first set with the identical actions that is farthest from all ofthe cases in the second set, or the case that is the centermost amongits similar cases, may be used as the archetype. Determining anarchetype in this way may be useful because it will find a case that maybe least likely to have an incorrect action based on input context.

The one or more archetype cases may be sent in response 150 to therequest for a suggested action. Further, a distance may be determinedbetween the archetype case and the input context. Any appropriatedistance measure, including those discussed herein may be used todetermine the distance between the archetype case and the input context.When this distance is within a certain threshold, the control of asystem may be caused 190 based on the suggested action. For example, ifthe input context is near the archetype, a system may be confident inperforming the suggested action because of the similarity of thesuggested action and the archetype. As noted elsewhere herein, thiscomparison may be used in addition to, or instead of, other comparisonsdiscussed herein. When the distance from the input context of the one ormore archetype cases is beyond the certain threshold, then one or moreexplanation factors may be determined and provided 180 in response tothe request for the suggested action. For example, the distance from theinput context to the one or more archetype cases and/or the one or morearchetype cases themselves may be provided as part of the explanation. Ahuman operator may look at the archetype cases and/or the distance tothe archetype cases from the input context and, based on thatinformation, may determine to continue to perform 181 the suggestedaction, not perform the suggested action and perform a different action,or perform no action at all.

Feature Residual Examples

In some embodiments, as part of determining 140 explanation data,feature residuals may be determined. As part of this determination 140,a regional model of two or more cases in the case-based reasoning modelmay be determined. As noted elsewhere herein, determining a regionalmodel may include determining the cases that are most similar to theinput context and/or the suggested case, based on a distance or distancemetric or premetric, a number of cases that are most similar, apercentage of model that is most similar, or based on density function.Then, a feature residual for each feature in the regional model,including features that are treated as inputs, may be determined 140based at least on part on how well the model predicts each feature if itwere removed. For example, determining the feature residuals can beaccomplished with mean absolute error, variance, and/or other methodssuch as kurtosis, skew, etc.

The feature residuals may then be sent in the response 150 to therequest for the suggested action along with the suggested action. Whenthe feature residuals are within a certain threshold, a system may thenautomatically cause 190 control based on the suggested action. Forexample, if the feature residuals are small, such as having meanabsolute error, then a system may be confident in performing thesuggested action without human review. When the feature residuals arebeyond a certain threshold, however, one or more explanation factors maybe determined and provided 180 in response to the request for suggestedaction. For example, if the feature residuals are high, such as havinghigh mean absolute error, then that information may be provided as oneor more of the explanation factors, possibly also with the cases in theregional model. A human operator may then review that information inorder to determine whether to perform 181 the suggested action, perform181 a different action, or perform no action at all.

Regional Model Complexity Examples

Returning to determining 140 explanation data, in some embodiments aregional model complexity associated with the one or more candidatecases may be determined 140. Determining a regional model is discussedelsewhere herein and may include determining the cases within a certaindistance, the most similar cases, a percentage of cases that are mostsimilar in the model, etc. Determining regional model complexity caninclude determining, for the model, entropy, whether the variance ishigh, whether the accuracy is low, whether correlations among variablesare low, etc.

After determining 140, a regional model complexity associated with a oneor more candidate cases, then the regional model complexity may beincluded in the response 150 to the request for suggested action. Whenthe regional model complexity is within a certain threshold, control ofa system may automatically be caused 190. For example, if a model is notcomplex, is accurate, etc., then the system may be confident inperforming the suggested action. When the regional model complexity isbeyond a certain threshold, however, then one or more explanationfactors may be determined and provided 180 in response to the requestfor the suggested action. For example, the regional model complexity,such as the accuracy, conviction, etc., may be provided along with thesuggested action in response to the original request for a suggestedaction. A human operator may review this information and determine basedon that information whether to perform 181 the suggested action, performa different action, or perform no action at all.

Fractal Dimensionality Examples

Returning again to determining 140 explanation data, in someembodiments, a regional model fractal dimensionality associated with theone or more candidate cases may be determined 140. Determining regionalmodel fractal dimensionality may include fitting a hyper box, hypersphere, or other hyper shape around the regional model. Then the shape,such as the hyper box, is reduced in scale and the count of the numberof boxes needed to cover the extent of the regional model is determined140. The scale used for the boxes and the threshold used may bedifferent in different embodiments. For example, the scale may be basedon log_(e) or log₂ and the threshold may be different based on thescale. For example, in some embodiments, the smaller the scale of thesmaller boxes used to cover, the higher the threshold may be.

If the number of boxes needed (the regional model fractionaldimensionality) is within a certain threshold, cause 190 control of asystem may be performed automatically based on the suggested action. Forexample, if the regional model complexity around the candidate cases islow, then a system may be confident in performing the suggested actionand therefore automatically cause 190 control of the system. When theregional model fractional dimensionality is beyond a certain threshold,however, then one or more explanation factors may be determined andprovided 180 in response to the request for the suggested action. Forexample, the regional model dimensionality, and perhaps a picture of thedetermination of the regional model for fractional dimensionality may beprovided in response to the original request for suggested action. Ahuman operator may review that information in order to determine whetherto perform 181 the suggested action, a different action, or no action atall.

The comparison with the regional model fractional dimensionality in thethreshold may be used in addition to or instead of other comparisonsdiscussed herein.

Conviction Ratios Examples

Returning again to determining 140 explanation data, in someembodiments, the relative surprisal or conviction of a feature withincertain scopes, and in comparison to other scopes, can be determined140. For example, a feature may have high conviction locally (within thenear N neighboring cases, as measured by a distance measure such asthose described herein), and lower conviction elsewhere, or vice versa.In the former, the feature would be considered locally stable andglobally noisy. In the latter, the opposite would hold and it would belocally noisy and globally stable.

Many possible scopes for conviction determination could be used andcompared. A few are presented here, and others may also be used. In someembodiments, each scope compared may be a function of the distance froma case. For example, as discussed elsewhere herein a region may bedetermined. The region may include the N most similar cases to the casein question, the most similar P percent (as compared to the entiremodel), the cases within distance D, or the cases within a local densitydistribution, as discussed elsewhere herein. For example, the N mostsimilar cases to the suggested case (or to the input context) may bedetermined based on a distance measure, such as those described herein.The number N may be a constant, either globally or locally specified, ora relative number, such as a percentage of the total model size.Further, the cases in the region may also be determined based ondensity. For example, as discussed elsewhere herein, if the cases aroundthe case of interest meet a particular density threshold, those mostsimilar cases could be included in the regional set of cases (and casesnot meeting those density thresholds could be excluded). Further, insome embodiments, the similarity (or distance) may be measured based onthe context only, the action only, or the context and the action. Insome embodiments, only a subset of the context and/or action is used todetermine similarity (or distance).

The following are some example measures that may be determined:

-   -   W: Conviction of feature in the whole model;    -   X: Conviction of a feature outside the regional model;    -   Y: Conviction of a feature inside the regional model;    -   Z: Conviction of feature for local (k neighbors) model;    -   where “local” would typically, but not always, constitute a        smaller number of cases than the “regional” model.

As discussed elsewhere herein, conviction can be measured in numerousways, including excluding a feature from a particular model or portionof a model and measure the conviction as a function the surprisal ofputting the feature (or features, or data elements) back in. Convictionmeasures are discussed extensively herein.

As noted, above, other measures (other than W, X, Y, and Z, listedabove) can be used. After two (or more) of the conviction measures arecalculated, the ratio of those measures may be determined. For example,in some embodiments, a determined 140 ratio may indicate whether asuggested case or feature of a case is “noisy.” The noisiness of afeature can be determined 140, in some embodiments, by determining 140local noisiness and/or relative noisiness. In some embodiments, localnoisiness can be determined by looking for the minimum of Y (or lookingfor the number of cases with Y<1). Relative noisiness may be determinedbased on the ratio of Z to W. As another example, in some embodiments, ahigh feature conviction ratio between W and Y may indicate that thefeature may be “noisy.” The noisiness of the feature may be indicatedbased on the ratio of W to Y and/or Y to W.

In some embodiments, measure other that W, X, Y, and Z listed above mayinclude measures based on feature importance to a given target, featureimportance to the whole model, predictability of a feature with orwithout confidence bounds, measures of whether features contribute to ordetract from accuracy, and/or the like. For example, in someembodiments, the techniques include determining prediction convictionfor features based on a conviction of the accuracy of the predictionusing residuals. Using such techniques may be beneficial when featuresthat negatively impact accuracy in a region may be considered “noisy”and therefore be useful as a measure to include in the determination 160of whether to automatically cause 190 performance of a suggested action.

Once the noisiness of a case/feature is determined 140, a decision canlater be made whether to cause 190 performance of the suggested action.For example, if the features (or action) of the suggested case are notnoisy (locally and/or regionally, depending on the embodiment), then asystem may be confident in performing the suggested action in thesuggested case. If, however, the features (or action) of the suggestedcase are noisy, then that noisiness measure may be provided 180 alongwith the suggested action. A human operator may then review thenoisiness data and determine whether to perform 181 the suggestedaction, a different action, or no action at all.

Prediction Conviction Examples

Returning again to determining 140 explanation data, in someembodiments, the certainty score is a prediction conviction of asuggested case. As such, determining 140 the certainty score can bedetermined as the prediction conviction. When the prediction convictionis determined 160 to be above a certain threshold, then performance ofthe suggested action can be caused 190. If the prediction conviction isdetermined 160 to be below a certain threshold, then the predictionconviction score can be provided 180 along with the suggested cases. Ahuman operator may then review the prediction conviction (and any otherexplanation data) and determine whether to perform 181 the suggestedaction, a different action, or no action at all.

Determination of prediction conviction is given below. First,familiarity conviction is discussed. Familiarity conviction is sometimescalled simply “conviction” herein. Prediction conviction is alsosometimes referred to as simply “conviction” herein. In each instancewhere conviction is used as the term herein, any of the convictionmeasures may be used. Further, when familiarity conviction or predictionconviction terms are used, those measure are appropriate, as are theother conviction measures discussed herein.

Feature Prediction Contribution Examples

Returning again to determining 140 explanation data, in someembodiments, feature prediction contribution is determined 140. Variousembodiments of determining 140 feature prediction contribution are givenbelow. In some embodiments, feature prediction contribution can be usedto flag what features are contributing most (or above a thresholdamount) to a suggestion. Such information can be useful for eitherensuring that certain features are not used for particular decisionmaking and/or ensuring that certain features are used in particulardecision making. If the feature prediction contribution of a prohibitedfeature is determined 160 to be above a certain threshold, then thesuggested action along with explanation data for the feature predictioncontribution can be provided 180 to a human operator, who may thenperform 181 the suggested action, a different action, or no action atall. If the feature prediction contribution for undesirable features aredetermined 160 to be below a certain threshold, then performance of thesuggested action may be caused 190 automatically.

Consider unknown and undesirable bias in a computer-based reasoningmodel. An example of this would be a decision-making computer-basedreasoning model making a decision based on a characteristic that itshould not, such deciding whether to approve a loan based on the heightof an applicant. The designers, user, or other operators of a loanapproval system may have flagged height as a prohibited factor fordecision making. If it is determined 140 that height was a factor (forexample, the feature prediction contribution is above a certainthreshold) in a loan decision, that information can be provided 180 to ahuman operator, who may then decide to perform 181 the suggested action(approve the loan notwithstanding that it was made at least in partbased on height), a different action, or no action at all. If thefeature prediction contribution of height is below the certainthreshold, then the loan may be approved without further review based onthe contribution of height to the decision.

As noted above, in some embodiments, there may also be features whosecontribution are desired (e.g., credit score in the case of a loanapproval). In such cases, if the feature prediction contribution for afeature whose contribution is desired is determined 160 to be below acertain threshold, then the suggested action along with the featureprediction contribution may be provided 180 to a human operator who maythen decide to perform 181 the suggested action (approve the loannotwithstanding that it was made at without contribution of the desiredfeature), a different action, or no action at all. If the featureprediction contribution of the desired feature is below the abovethreshold, then performance of the action may be caused 190 (e.g., loanmay be approved) without further review based on the contribution of thedesired feature (e.g., credit score) to the decision.

In some embodiments, not depicted in FIG. 1, the feature contribution isused to reduce the size of a model in a computer-based reasoning system.For example, if a feature does not contribute much to a model, then itmay be removed from the model. As a more specific example, the featureprediction contribution may be determined for multiple input contexts(e.g., tens of, hundreds of, thousands of, or more) input contexts andthe feature contribution may be determined for each feature for eachinput context. Those features that never reach an exclusionary thresholdamount of contribution to a decision (e.g., as determined by the featureprediction contribution) may be excluded from the computer-basedreasoning model. In some embodiments, only those features that reach aninclusion threshold may be included in the computer-based reasoningmodel. In some embodiments, both an exclusionary lower threshold andinclusionary upper threshold may be used. In other embodiments, averagecontribution of a feature may be used to rank features and the top Nfeatures may be those included in the models. Excluding features fromthe model may be beneficial in embodiments where the size of the modelcauses the need for extra storage and/or computing power. In manycomputer-based reasoning systems, smaller models (e.g., with fewerfeatures being analyzed) may be more efficient to store and when makingdecision. The reduced models may be used, for example, with any of thetechniques described herein.

Familiarity Conviction Examples

In some embodiments, it may be useful to employ conviction as measure ofhow much information the point distorts the model. To do so, one maydefine feature conviction such that a point's weighted distancecontribution affects other points' distance contribution and compared tothe expected distance contribution of adding any new point.

Definition 1

Given a point x∈X and the set K of its k nearest neighbors, a distancefunction d:R^(z)×Z→R, and a distance exponent α, the distancecontribution of x may be the harmonic mean

$\begin{matrix}{{\phi(x)} = {\left( {\frac{1}{K}{\sum\limits_{k \in K}\;\frac{1}{{d\left( {x,k} \right)}^{\propto}}}} \right)^{- 1}.}} & (1)\end{matrix}$

Definition 2

Given a set of points X⊂R^(z) for every x∈X and an integer 1≤k<|X| onemay define the distance contribution probability distribution, C of X tobe the set

$\begin{matrix}{C = \left\{ {\frac{\phi\left( x_{1} \right)}{\sum\limits_{i = 1}^{n}{\phi\left( x_{i} \right)}},\frac{\phi\left( x_{2} \right)}{\sum\limits_{i = 1}^{n}{\phi\left( x_{i} \right)}},\ldots\mspace{14mu},\frac{\phi\left( x_{n} \right)}{\sum\limits_{i = 1}^{n}{\phi\left( x_{i} \right)}}} \right\}} & (2)\end{matrix}$for a function φ: X→R that returns the distance contribution.

Note that if φ(0)=∞, special consideration may be given to multipleidentical points, such as splitting the distance contribution amongthose points.

Remark 1

C may be a valid probability distribution. In some embodiments, thisfact is used to compute the amount of information in C.

Definition 3

The point probability of a point x_(i), i=1, 2, . . . , n may be

$\begin{matrix}{{l(i)} = \frac{\phi\left( x_{i} \right)}{\sum\limits_{i}\;{\phi\left( x_{i} \right)}}} & (3)\end{matrix}$where the index i is assigned the probability of the indexed point'sdistance contribution. One may denote this random variable L.

Remark 2

When points are selected uniformly at random, one may assume L isuniform when the distance probabilities have no trend or correlation.

Definition 4

The conviction of a point x_(i)∈X may be

$\begin{matrix}{{\pi\left( x_{i} \right)} = \frac{\frac{1}{X}{\sum\limits_{i}{{\mathbb{K}\mathbb{L}}\left( {{{L{}L} - \left\{ i \right\}}\bigcup{{\mathbb{E}}\;{l(i)}}} \right)}}}{{\mathbb{K}\mathbb{L}}\left( {{{L{}L} - \left\{ x_{i} \right\}}\bigcup{{\mathbb{E}}\;{l(i)}}} \right)}} & (4)\end{matrix}$where KL is the Kullback-Leibler divergence. In some embodiments, whenone assumes L is uniform, one may have that the expected probability

${{\mathbb{E}}\;{l(i)}} = {\frac{1}{n}.}$

Prediction Conviction Examples

In some embodiments, it is useful to employ conviction as a proxy foraccuracy of a prediction. To do so, one may define another type ofconviction such that a point's weighted distance to other points is ofprimary importance, and can be expressed as the information required todescribe the position of the point in question relative to existingpoints.

Definition 5

Let q be the number of features in a model and n the number ofobservations. One may define the residual function of the training dataX:r:X→R ^(q)  (5)r(x)=J ₁(k,p),J ₂(k,p), . . . ,k(k,p)  (6)Where J may be the error function parameterized by the hyperparameters kand p evaluated on points near x. In some embodiments, one may refer tothe residual function evaluated on all of the model data as r_(M).

In some embodiments, one can quantify the information needed to expressa distance contribution φ(x) by moving to a probability. This may beaccomplished by setting the expected value of the ExponentialDistribution (which is the maximum entropy distribution constrained bythe first moment) to be the magnitude of the residual vector:

$\begin{matrix}{\frac{1}{\lambda} = {{r(x)}}_{p}} & (7)\end{matrix}$

In some embodiments, the distance contribution can be other relevant orapplicable distributions, such as the log normal distribution, Gaussiandistribution, normal distribution, etc.

In some embodiments, one can then determine the probability that adistance contribution is greater than 0:

$\begin{matrix}{{P\left( {{{r(x)}}_{p} \leq 0} \right)} = e^{{- \frac{1}{{{r{(x)}}}_{p}}} \cdot {\phi{(x)}}}} & (8)\end{matrix}$

In some embodiments, one may determine the distance contribution interms of the probability that two points are the same given theiruncertainties, or alternatively the probability that two points aredifferent given their uncertainties.

One may also convert the probability to information:I(x)=−ln P(∥r(x)∥_(p)≤0)  (9)

Which can be simply written as:

$\begin{matrix}{{I(y)} = \frac{\phi(x)}{{{r(x)}}_{p}}} & (10)\end{matrix}$

As the distance contribution decreases, or as the residual vectormagnitude increases, the less information is needed to represent thispoint. One can then compare this to the expected value in regularconviction form, yielding a prediction conviction

$\begin{matrix}{\pi_{a} = \frac{{\mathbb{E}}\; I}{I(x)}} & (11)\end{matrix}$where I is the set of information calculated for each point in themodel.

Feature Prediction Contribution Examples

In some embodiments, Feature Prediction Contribution may be related MeanDecrease in Accuracy (MDA). In MDA scores are established for modelswith all the features M and models with each feature held out M_(−f)_(i) , i=1 . . . q. The difference |M−M_(−f) _(i) | is the importance ofeach feature, where the result's sign is altered depending on whetherthe goal is to maximize or minimize score.

In some embodiments, prediction information is correlated with accuracyand thus may be used as a surrogate.

$M = {\frac{1}{n}{\sum\limits_{i}{I\left( x_{i} \right)}}}$$M_{- f_{i}} = {\frac{1}{n}{\sum\limits_{j}{I_{{- f}\; i}\left( x_{j} \right)}}}$

One can now make two definitions:

Definition 6

The prediction contribution of feature i is

$\frac{M - M_{- f_{i}}}{M}$

Definition 7

The prediction conviction of feature i is

$\frac{\frac{1}{q}{\sum_{i}^{q}M_{- f_{i}}}}{M_{{- f}\; i}}$

Additional Embodiments

Not depicted in FIG. 1, more than one of the explanation data may bedetermined and used together. For example, any of the fractaldimensionality, conviction, complexity, feature residual, featureprediction contribution, regional model complexity, archetype and/orcounterfactual cases, and/or other measures can be used together todetermine whether to automatically cause 190 performance of thesuggested action. For example, the suggested action may be caused 190 ifthe certainty is high and there are no feature values outside the rangeof the local model.

Not depicted in FIG. 1, in embodiments described herein, discussion ofdetermining measures such as conviction, complexity, fractaldimensionality, residuals, distances, certainty, surprisal and the likeis based on either determining surprisal based on context in a dataelement, actions in a data element, or both. Notwithstanding that sometechniques may be described as using calculation based just on contexts,just on actions, or just on a combination of the two, the techniques canbe performing based on any of: context, actions, or a combination of thetwo. Further, subsets of the contexts, actions, or a combination of thetwo can be used.

Systems for Feature and Case Importance and Confidence for Explainableand Automated Decisions in Computer-Based Reasoning Systems

FIG. 2 is a block diagram depicting example systems for explainable andautomated decisions in computer-based reasoning systems. Numerousdevices and systems are coupled to a network 290. Network 290 caninclude the internet, a wide area network, a local area network, a Wi-Finetwork, any other network or communication device described herein, andthe like. Further, numerous of the systems and devices connected to 290may have encrypted communication there between, VPNs, and or any otherappropriate communication or security measure. System 200 includes atraining and analysis system 210 coupled to network 290. The trainingand analysis system 210 may be used for collecting data related tosystems 250-258 and creating computer based reasoning models based onthe training of those systems. Further, training and analysis system 210may perform aspects of process 100 and/or 400 described herein. Controlsystem 220 is also coupled to network 290. A control system 220 maycontrol various of the systems 250-258. For example, a vehicle control221 may control any of the vehicles 250-253, or the like. In someembodiments, there may be one or more network attached storages 230,240. These storages 230, 240 may store training data, computer-basedreasoning models, updated computer based reasoning models, and the like.In some embodiments, training and analysis system 210 and/or controlsystem 220 may store any needed data including computer based reasoningmodels locally on the system.

FIG. 2 depicts numerous systems 250-258 that may be controlled by acontrol system 220 or 221. For example, automobile 250, helicopter 251,submarine 252, boat 253, factory equipment 254, construction equipment255, security equipment 256, oil pump 257, or warehouse equipment 258may be controlled by a control system 220 or 221.

Example Processes for Controlling Systems

FIG. 4 depicts an example process 400 for controlling a system. In someembodiments and at a high level, the process 400 proceeds by receivingor receiving 410 a computer-based reasoning model for controlling thesystem. The computer-based reasoning model may be one created usingprocess 100, as one example. In some embodiments, the process 400proceeds by receiving 420 a current context for the system, determining430 an action to take based on the current context and thecomputer-based reasoning model, and causing 440 performance of thedetermined action (e.g., labelling an image, causing a vehicle toperform the turn, lane change, waypoint navigation, etc.). If operationof the system continues 450, then the process returns to receive 420 thecurrent context, and otherwise discontinues 460 control of the system.In some embodiments, causing 190 performance of a selected action mayinclude causing 440 performance of a determined action (or vice-versa).

As discussed herein the various processes 100, 400, etc. may run inparallel, in conjunction, together, or one process may be a subprocessof another. Further, any of the processes may run on the systems orhardware discussed herein. The features and steps of processes 100 and400 could be used in combination and/or in different orders.

Self-Driving Vehicles

Returning to the top of the process 400, it begins by receiving 410 acomputer-based reasoning model for controlling the system. Thecomputer-based reasoning model may be received in any appropriatematter. It may be provided via a network 290, placed in a shared oraccessible memory on either the training and analysis system 210 orcontrol system 220, or in accessible storage, such as storage 230 or240.

In some embodiments (not depicted in FIG. 4), an operational situationcould be indicated for the system. The operational situation is relatedto context, but may be considered a higher level, and may not change (orchange less frequently) during operation of the system. For example, inthe context of control of a vehicle, the operational situation may beindicated by a passenger or operator of the vehicle, by a configurationfile, a setting, and/or the like. For example, a passenger Alicia mayselect “drive like Alicia” in order to have the vehicle driver like her.As another example, a fleet of helicopters may have a configuration fileset to operate like Bob. In some embodiments, the operational situationmay be detected. For example, the vehicle may detect that it isoperating in a particular location (area, city, region, state, orcountry), time of day, weather condition, etc. and the vehicle may beindicated to drive in a manner appropriate for that operationalsituation.

The operational situation, whether detected, indicated by passenger,etc., may be changed during operation of the vehicle. For example, apassenger may first indicate that she would like the vehicle to drivecautiously (e.g., like Alicia), and then realize that she is runninglater and switch to a faster operation mode (e.g., like Carole). Theoperational situation may also change based on detection. For example,if a vehicle is operating under an operational situation for aparticular portion of road, and detects that it has left that portion ofroad, it may automatically switch to an operational situationappropriate for its location (e.g., for that city), may revert to adefault operation (e.g., a baseline program that operates the vehicle)or operational situation (e.g., the last used). In some embodiments, ifthe vehicle detects that it needs to change operational situations, itmay prompt a passenger or operator to choose a new operationalsituation.

In some embodiments, the computer-based reasoning model is receivedbefore process 400 begins (not depicted in FIG. 4), and the processbegins by receiving 420 the current context. For example, thecomputer-based reasoning model may already be loaded into a controller220 and the process 400 begins by receiving 420 the current context forthe system being controlled. In some embodiments, referring to FIG. 2,the current context for a system to be controlled (not depicted in FIG.2) may be sent to control system 220 and control system 220 may receive420 current context for the system.

Receiving 420 current context may include receiving the context dataneeded for a determination to be made using the computer-based reasoningmodel. For example, turning to the vehicular example, receiving 420 thecurrent context may, in various embodiments, include receivinginformation from sensors on or near the vehicle, determining informationbased on location or other sensor information, accessing data about thevehicle or location, etc. For example, the vehicle may have numeroussensors related to the vehicle and its operation, such as one or more ofeach of the following: speed sensors, tire pressure monitors, fuelgauges, compasses, global positioning systems (GPS), RADARs, LiDARs,cameras, barometers, thermal sensors, accelerometers, strain gauges,noise/sound measurement systems, etc. Current context may also includeinformation determined based on sensor data. For example, the time toimpact with the closest object may be determined based on distancecalculations from RADAR or LiDAR data, and/or may be determined based ondepth-from-stereo information from cameras on the vehicle. Context mayinclude characteristics of the sensors, such as the distance a RADAR orLiDAR is capable of detecting, resolution and focal length of thecameras, etc. Context may include information about the vehicle not froma sensor. For example, the weight of the vehicle, acceleration,deceleration, and turning or maneuverability information may be knownfor the vehicle and may be part of the context information.Additionally, context may include information about the location,including road condition, wind direction and strength, weather,visibility, traffic data, road layout, etc.

Referring back to the example of vehicle control rules for Bob flying ahelicopter, the context data for a later flight of the helicopter usingthe vehicle control rules based on Bob's operation of the helicopter mayinclude fuel remaining, distance that fuel can allow the helicopter totravel, location including elevation, wind speed and direction,visibility, location and type of sensors as well as the sensor data,time to impact with the N closest objects, maneuverability and speedcontrol information, etc. Returning to the stop sign example, whetherusing vehicle control rules based on Alicia or Carole, the context mayinclude LiDAR, RADAR, camera and other sensor data, locationinformation, weight of the vehicle, road condition and weatherinformation, braking information for the vehicle, etc.

The control system then determined 430 an action to take based on thecurrent context and the computer-based reasoning model. For example,turning to the vehicular example, an action to take is determined 430based on the current context and the vehicle control rules for thecurrent operational situation. In some embodiments that use machinelearning, the vehicle control rules may be in the form of a neuralnetwork (as described elsewhere herein), and the context may be fed intothe neural network to determine an action to take. In embodiments usingcase-based reasoning, the set of context-action pairs closest (or mostsimilar) to the current context may be determined. In some embodiments,only the closest context-action pair is determined, and the actionassociated with that context-action pair is the determined 430 action.In some embodiments, multiple context-action pairs are determined 430.For example, the N “closest” context-action pairs may be determined 430,and either as part of the determining 430, or later as part of thecausing 440 performance of the action, choices may be made on the actionto take based on the N closest context-action pairs, where “distance”for between the current context can be measured using any appropriatetechnique, including use of Euclidean distance, Minkowski distance,Damerau-Levenshtein distance, Kullback-Leibler divergence, and/or anyother distance measure, metric, pseudometric, premetric, index, or thelike.

In some embodiments, the actions to be taken may be blended based on theaction of each context-action pair, with invalid (e.g., impossible ordangerous) outcomes being discarded. A choice can also be made among theN context-action pairs chosen based on criteria such as choosing to usethe same or different operator context-action pair from the lastdetermined action. For example, in an embodiment where there arecontext-action pair sets from multiple operators in the vehicle controlrules, the choice of which context-action pair may be based on whether acontext-action pair from the same operator was just chosen (e.g., tomaintain consistency). The choice among the top N context-action pairsmay also be made by choosing at random, mixing portions of the actionstogether, choosing based on a voting mechanism, etc.

Some embodiments include detecting gaps in the training data and/orvehicle control rules and indicating those during operation of thevehicle (for example, via prompt and/or spoken or graphical userinterface) or offline (for example, in a report, on a graphical display,etc.) to indicate what additional training is needed (not depicted inFIG. 4). In some embodiments, when the computer-based reasoning systemdoes not find context “close enough” to the current context to make aconfident decision on an action to take, it may indicate this andsuggest that an operator might take manual control of the vehicle, andthat operation of the vehicle may provide additional context and actiondata for the computer-based reasoning system. Additionally, in someembodiments, an operator may indicate to a vehicle that she would liketo take manual control to either override the computer-based reasoningsystem or replace the training data. These two scenarios may differ bywhether the data (for example, context-action pairs) for the operationalscenario are ignored for this time period, or whether they are replaced.

In some embodiments, the operational situation may be chosen based on aconfidence measure indicating confidence in candidate actions to takefrom two (or more) different sets of control rules (not depicted in FIG.4). Consider a first operational situation associated with a first setof vehicle control rules (e.g., with significant training from Aliciadriving on highways) and a second operational situation associated witha second set of vehicle control rules (e.g., with significant trainingfrom Carole driving on rural roads). Candidate actions and associatedconfidences may be determined for each of the sets of vehicle controlrules based on the context. The determined 430 action to take may thenbe selected as the action associated with the higher confidence level.For example, when the vehicle is driving on the highway, the actionsfrom the vehicle control rules associated with Alicia may have a higherconfidence, and therefore be chosen. When the vehicle is on rural roads,the actions from the vehicle control rules associated with Carole mayhave higher confidence and therefore be chosen. Relatedly, in someembodiments, a set of vehicle control rules may be hierarchical, andactions to take may be propagated from lower levels in the hierarchy tohigh levels, and the choice among actions to take propagated from thelower levels may be made on confidence associated with each of thosechosen actions. The confidence can be based on any appropriateconfidence calculation including, in some embodiments, determining howmuch “extra information” in the vehicle control rules is associated withthat action in that context.

In some embodiments, there may be a background or baseline operationalprogram that is used when the computer-based reasoning system does nothave sufficient data to make a decision on what action to take (notdepicted in FIG. 4). For example, if in a set of vehicle control rules,there is no matching context or there is not a matching context that isclose enough to the current context, then the background program may beused. If none of the training data from Alicia included what to do whencrossing railroad tracks, and railroad tracks are encountered in lateroperation of the vehicle, then the system may fall back on the baselineoperational program to handle the traversal of the railroad tracks. Insome embodiments, the baseline model is a computer-based reasoningsystem, in which case context-action pairs from the baseline model maybe removed when new training data is added. In some embodiments, thebaseline model is an executive driving engine which takes over controlof the vehicle operation when there are no matching contexts in thevehicle control rules (e.g., in the case of a context-based reasoningsystem, there might be no context-action pairs that are sufficiently“close”).

In some embodiments, determining 430 an action to take based on thecontext can include determining whether vehicle maintenance is needed.As described elsewhere herein, the context may include wear and/ortiming related to components of the vehicle, and a message related tomaintenance may be determined based on the wear or timing. The messagemay indicate that maintenance may be needed or recommended (e.g.,because preventative maintenance is often performed in the timing orwear context, because issues have been reported or detected withcomponents in the timing or wear context, etc.). The message may be sentto or displayed for a vehicle operator (such as a fleet managementservice) and/or a passenger. For example, in the context of anautomobile with sixty thousand miles, the message sent to a fleetmaintenance system may include an indication that a timing belt may needto be replaced in order to avoid a P percent chance that the belt willbreak in the next five thousand miles (where the predictive informationmay be based on previously-collected context and action data, asdescribed elsewhere herein). When the automobile reaches ninety thousandmiles and assuming the belt has not been changed, the message mayinclude that the chance that the belt will break has increased to, e.g.,P*4 in the next five thousand miles.

Performance of the determined 430 action is then caused 440. Turning tothe vehicular example, causing 440 performance of the action may includedirect control of the vehicle and/or sending a message to a system,device, or interface that can control the vehicle. The action sent tocontrol the vehicle may also be translated before it is used to controlthe vehicle. For example, the action determined 430 may be to navigateto a particular waypoint. In such an embodiment, causing 440 performanceof the action may include sending the waypoint to a navigation system,and the navigation system may then, in turn, control the vehicle on afiner-grained level. In other embodiments, the determined 430 action maybe to switch lanes, and that instruction may be sent to a control systemthat would enable the car to change the lane as directed. In yet otherembodiments, the action determined 430 may be lower-level (e.g.,accelerate or decelerate, turn 4° to the left, etc.), and causing 440performance of the action may include sending the action to be performedto a control of the vehicle, or controlling the vehicle directly. Insome embodiments, causing 440 performance of the action includes sendingone or more messages for interpretation and/or display. In someembodiments, the causing 440 the action includes indicating the actionto be taken at one or more levels of a control hierarchy for a vehicle.Examples of control hierarchies are given elsewhere herein.

Some embodiments include detecting anomalous actions taken or caused 440to be taken. These anomalous actions may be signaled by an operator orpassenger, or may be detected after operation of the vehicle (e.g., byreviewing log files, external reports, etc.). For example, a passengerof a vehicle may indicate that an undesirable maneuver was made by thevehicle (e.g., turning left from the right lane of a 2-lane road) or logfiles may be reviewed if the vehicle was in an accident. Once theanomaly is detected, the portion of the vehicle control rules (e.g.,context-action pair(s)) related to the anomalous action can bedetermined. If it is determined that the context-action pair(s) areresponsible for the anomalous action, then those context-action pairscan be removed or replaced using the techniques herein.

Referring to the example of the helicopter fleet and the vehicle controlrules associated with Bob, the vehicle control 220 may determine 430what action to take for the helicopter based on the received 420context. The vehicle control 220 may then cause the helicopter toperform the determined action, for example, by sending instructionsrelated to the action to the appropriate controls in the helicopter. Inthe driving example, the vehicle control 220 may determine 430 whataction to take based on the context of vehicle. The vehicle control maythen cause 440 performance of the determined 430 action by theautomobile by sending instructions to control elements on the vehicle.

If there are more 450 contexts for which to determine actions for theoperation of the system, then the process 400 returns to receive 410more current contexts. Otherwise, process 400 ceases 460 control of thesystem. Turning to the vehicular example, as long as there is acontinuation of operation of the vehicle using the vehicle controlrules, the process 400 returns to receive 420 the subsequent currentcontext for the vehicle. If the operational situation changes (e.g., theautomobile is no longer on the stretch of road associated with theoperational situation, a passenger indicates a new operationalsituation, etc.), then the process returns to determine the newoperational situation. If the vehicle is no longer operating undervehicle control rules (e.g., it arrived at its destination, a passengertook over manual control, etc.), then the process 400 will discontinue460 autonomous control of the vehicle.

Many of the examples discussed herein for vehicles discuss self-drivingautomobiles. As depicted in FIG. 2, numerous types of vehicles can becontrolled. For example, a helicopter 251 or drone, a submarine 252, orboat or freight ship 253, or any other type of vehicle such as plane ordrone (not depicted in FIG. 2), construction equipment, (not depicted inFIG. 2), and/or the like. In each case, the computer-based reasoningmodel may differ, including using different features, using differenttechniques described herein, etc. Further, the context of each type ofvehicle may differ. Flying vehicles may need context data such asweight, lift, drag, fuel remaining, distance remaining given fuel,windspeed, visibility, etc. Floating vehicles, such as boats, freightvessels, submarines, and the like may have context data such asbuoyancy, drag, propulsion capabilities, speed of currents, a measure ofthe choppiness of the water, fuel remaining, distance capabilityremaining given fuel, and the like. Manufacturing and other equipmentmay have as context width of area traversing, turn radius of thevehicle, speed capabilities, towing/lifting capabilities, and the like.

Image Labelling

The techniques herein may also be applied in the context of animage-labeling system. For example, numerous experts may label images(e.g., identifying features of or elements within those images). Forexample, the human experts may identify cancerous masses on x-rays.Having these experts label all input images is incredibly time consumingto do on an ongoing basis, in addition to being expensive (paying theexperts). The techniques herein may be used to train an image-labelingcomputer-based reasoning model based on previously-trained images. Oncethe image-labeling computer-based reasoning system has been built, theninput images may be analyzed using the image-based reasoning system. Inorder to build the image-labeling computer-based reasoning system,images may be labeled by experts and used as training data. Using thetechniques herein, the surprisal of the training data can be used tobuild an image-labeling computer-based reasoning system that balancesthe size of the computer-based reasoning model with the information thateach additional image (or set of images) with associated labelsprovides. Once the image-labelling computer-based reasoning is trained,it can be used to label images in the future. For example, a new imagemay come in, the image-labelling computer-based reasoning may determineone or more labels for the image, and then the one or more labels maythen be applied to the image. Thus, these images can be labeledautomatically, saving the time and expense related to having expertslabel the images.

In some embodiments, processes 100 or 400 may include determining thesurprisal of each image (or multiple images) and the associated labelsor of the aspects of the computer-based reasoning model. The surprisalfor the one or more images may be determined and a determination may bemade whether to select or include the one or more images (or aspects) inthe image-labeling computer-based reasoning model based on thedetermined surprisal. While there are more sets of one or more imageswith labels to assess, the process may return to determine whether moreimage or label sets should be included or whether aspects should beincluded and/or changed in the model. Once there are no more images oraspects to consider, the process can turn to controlling the imageanalysis system using the image-labeling computer-based reasoning.

In some embodiments, process 100 may determine (e.g., in response to arequest) the suggested cases and explanation data for in theimage-labeling computer-based reasoning model. Based on a determinationmade based on the suggested action and/or explanation data, the processcan cause 190 control of an image-labeling system using process 400. Forexample, if the data elements are related to images and labels appliedto those images, then the image-labeling computer-based reasoning modeltrained on that data will apply labels to incoming images. Process 400proceeds by receiving 410 an image-labeling computer-based reasoningmodel. The process proceeds by receiving 420 an image for labeling. Theimage-labeling computer-based reasoning model is then used to determine430 labels for the input image. The image is then labeled 440. If thereare more 450 images to label, then the system returns to receive 410those images and otherwise ceases 460. In such embodiments, theimage-labeling computer-based reasoning model may be used to selectlabels based on which training image is “closest” (or most similar) tothe incoming image. The label(s) associated with that image will then beselected to apply to the incoming image.

Manufacturing and Assembly

The process 100 may also be applied in the context of manufacturingand/or assembly. For example, conviction can be used to identify normalbehavior versus anomalous behavior of such equipment. Using thetechniques herein, a crane (e.g., crane 255 of FIG. 2), robot arm, orother actuator is attempting to “grab” something and its surprisal istoo high, it can stop, sound an alarm, shutdown certain areas of thefacility, and/or request for human assistance. Anomalous behavior thatis detected via conviction among sensors and actuators can be used todetect when there is some sort breakdown, unusual wear and tear ormechanical or other malfunction, an unusual component or seed or crop,etc. It can also be used to find damaged equipment for repairs orbuffing or other improvements for any robots that are searching andcorrecting defects in products or themselves (e.g., fixing a broken wireor smoothing out cuts made to the ends of a manufactured artifact madevia an extrusion process). Conviction can also be used for cranes andother grabbing devices to find which cargo or items are closest matchesto what is needed. Conviction can be used to drastically reduce theamount of time to train a robot to perform a new task for a new productor custom order, because the robot will indicate the aspects of theprocess it does not understand and direct training towards those areasand away from things it has already learned. Combining this withstopping ongoing actions when an anomalous situation is detected wouldalso allow a robot to begin performing work before it is fully donetraining, the same way that a human apprentice may help out someoneexperienced while the apprentice is learning the job. Conviction canalso inform what features or inputs to the robot are useful and whichare not.

In some embodiments, process 100 may determine (e.g., in response to arequest) the surprisal of one or more data elements (e.g., of themanufacturing equipment) or aspects (e.g., features of context-actionpairs or aspects of the model) to potentially include in themanufacturing control computer-based reasoning model. The surprisal forthe one or more manufacturing elements may be determined and adetermination may be made whether to select or include the one or moremanufacturing data elements or aspects in the manufacturing controlcomputer-based reasoning model based on the determined surprisal. Whilethere are more sets of one or more manufacturing data elements oraspects to assess, the process may return to determine whether moremanufacturing data elements or aspects sets should be included. Oncethere are no more manufacturing data elements or aspects to consider,the process can turn to controlling the manufacturing system using themanufacturing control computer-based reasoning system.

In some embodiments, process 100 may determine (e.g., in response to arequest) the suggested cases and explanation data for in themanufacturing control computer-based reasoning model. Based on adetermination made based on the suggested action and/or explanationdata, the process can cause 190 control of a manufacturing system may beaccomplished by process 400. For example, if the data elements arerelated to manufacturing data elements or aspects, then themanufacturing control computer-based reasoning model trained on thatdata will control manufacturing or assemble. Process 400 proceeds byreceiving 410 a manufacturing control computer-based reasoning model.The process proceeds by receiving 420 a context. The manufacturingcontrol computer-based reasoning model is then used to determine 430 anaction to take. The action is then performed by the control system(e.g., caused by the manufacturing control computer-based reasoningsystem). If there are more 450 contexts to consider, then the systemreturns to receive 410 those contexts and otherwise ceases 460. In suchembodiments, the manufacturing control computer-based reasoning modelmay be used to control a manufacturing system. The chosen actions arethen performed by a control system.

Smart Voice Control

The processes 100 and 400 may also be applied in the context of smartvoice control. For example, combining multiple inputs and forms ofanalysis, the techniques herein can recognize if there is somethingunusual about a voice control request. For example, if a request is topurchase a high-priced item or unlock a door, but the calendar andsynchronized devices indicate that the family is out of town, it couldsend a request to the person's phone before confirming the order oraction; it could be that an intruder has recorded someone's voice in thefamily or has used artificial intelligence software to create a messageand has broken in. It can detect other anomalies for security or fordevices activating at unusual times, possibly indicating some mechanicalfailure, electronics failure, or someone in the house using thingsabnormally (e.g., a child frequently leaving the refrigerator door openfor long durations). Combined with other natural language processingtechniques beyond sentiment analysis, such as vocal distress, a smartvoice device can recognize that something is different and ask,improving the person's experience and improving the seamlessness of thedevice into the person's life, perhaps playing music, adjustinglighting, or HVAC, or other controls. The level of confidence providedby conviction can also be used to train a smart voice device morequickly as it can ask questions about aspects of its use that it has theleast knowledge about. For example: “I noticed usually at night, butalso some days, you turn the temperature down in what situations shouldI turn the temperature down? What other inputs (features) should Iconsider?”

Using the techniques herein, a smart voice device may also be able tolearn things it otherwise may not be able to. For example, if the smartvoice device is looking for common patterns in any of the aforementionedactions or purchases and the conviction drops below a certain threshold,it can ask the person if it should take on a particular action oradditional autonomy without prompting, such as “It looks like you'renormally changing the thermostat to colder on days when you have yourexercise class, but not on days when it is cancelled; should I do thisfrom now on and prepare the temperature to your liking?”

In some embodiments, process 100 may determine (e.g., in response to arequest) the surprisal of one or more data elements (e.g., of the smartvoice system) or aspects (e.g., features of the data or parameters ofthe model) to potentially include in the smart voice system controlcomputer-based reasoning model. The surprisal for the one or more smartvoice system data elements or aspects may be determined and adetermination may be made whether to include the one or more smart voicesystem data elements or aspects in the smart voice system controlcomputer-based reasoning model based on the determined surprisal. Whilethere are more sets of one or more smart voice system data elements oraspects to assess, the process may return to determine whether moresmart voice system data elements or aspects sets should be included.Once there are no more smart voice system data elements or aspects toconsider, the process can turn to controlling the smart voice systemusing the smart voice system control computer-based reasoning model.

In some embodiments, process 100 may determine (e.g., in response to arequest) the suggested cases and explanation data for in the smart voicecomputer-based reasoning model. Based on a determination made based onthe suggested action and/or explanation data, the process can cause 190control of a smart voice system using process 400. For example, if thedata elements are related to smart voice system actions, then the smartvoice system control computer-based reasoning model trained on that datawill control smart voice systems. Process 400 proceeds by receiving 410a smart voice computer-based reasoning model. The process proceeds byreceiving 420 a context. The smart voice computer-based reasoning modelis then used to determine 430 an action to take. The action is thenperformed by the control system (e.g., caused by the smart voicecomputer-based reasoning system). If there are more 450 contexts toconsider, then the system returns to receive 410 those contexts andotherwise ceases 460. In such embodiments, the smart voicecomputer-based reasoning model may be used to control a smart voicesystem. The chosen actions are then performed by a control system.

Control of Federarted Devices

The process 100 may also be applied in the context of federated devicesin a system. For example, combining multiple inputs and forms ofanalysis, the techniques herein can recognize if there is something thatshould trigger action based on the state of the federated devices. Forexample, if the training data includes actions normally taken and/orstatuses of federated devices, then an action to take could be anoften-taken action in the certain (or related contexts). For example, inthe context of a smart home with interconnected heating, cooling,appliances, lights, locks, etc., the training data could be what aparticular user does at certain times of day and/or in particularsequences. For example, if, in a house, the lights in the kitchen arenormally turned off after the stove has been off for over an hour andthe dishwasher has been started, then when that context again occurs,but the kitchen light has not been turned off, the computer-basedreasoning system may cause an action to be taken in the smart homefederated systems, such as prompting (e.g., audio) whether the user ofthe system would like the kitchen lights to be turned off. As anotherexample, training data may indicate that a user sets the house alarm andlocks the door upon leaving the house (e.g., as detected via geofence).If the user leaves the geofenced location of the house and has not yetlocked the door and/or set the alarm, the computer-based reasoningsystem may cause performance of an action such as inquiring whether itshould lock the door and/or set an alarm. As yet another example, in thesecurity context, the control may be for turning on/off cameras, orenact other security measures, such as sounding alarms, locking doors,or even releasing drones and the like. Training data may includeprevious logs and sensor data, door or window alarm data, time of day,security footage, etc. and when security measure were (or should havebeen) taken. For example, a context such as particular window alarm datafor a particular basement window coupled with other data may beassociated with an action of sounding an alarm, and when a contextoccurs related to that context, an alarm may be sounded.

In some embodiments, process 100 may determine the surprisal of one ormore data elements or aspects of the federated device control system forpotential inclusion in the federated device control computer-basedreasoning model. The surprisal for the one or more federated devicecontrol system data elements may be determined and a determination maybe made whether to select or include the one or more federated devicecontrol system data elements in the federated device controlcomputer-based reasoning model based on the determined surprisal. Whilethere are more sets of one or more federated device control system dataelements or aspects to assess, the process may return to determinewhether more federated device control system data elements or aspectsets should be included. Once there are no more federated device controlsystem data elements or aspects to consider, the process can turn tocontrolling the federated device control system using the federateddevice control computer-based reasoning model.

In some embodiments, process 100 may determine (e.g., in response to arequest) the suggested cases and explanation data for in the federateddevice computer-based reasoning model. Based on a determination madebased on the suggested action and/or explanation data, the process cancause 190 control of a federated device system may be accomplished byprocess 400. For example, if the data elements are related to federateddevice system actions, then the federated device control computer-basedreasoning model trained on that data will control federated devicecontrol system. Process 400 proceeds by receiving 410 a federated devicecontrol computer-based reasoning model. The process proceeds byreceiving 420 a context. The federated device control computer-basedreasoning model is then used to determine 430 an action to take. Theaction is then performed by the control system (e.g., caused by thefederated device control computer-based reasoning system). If there aremore 450 contexts to consider, then the system returns to receive 410those contexts and otherwise ceases 460. In such embodiments, thefederated device control computer-based reasoning model may be used tocontrol federated devices. The chosen actions are then performed by acontrol system.

Control and Automation of Experiments

The process 100 may also be used in the context of control systems forlaboratory experiments. For example, many lab experiments today,especially in the biological and life sciences, but also in materialsscience and others, yield combinatorial increases, in terms of numbers,of possibilities and results. The fields of design of experiment, aswell as many combinatorial search and exploration techniques arecurrently combined with statistical analysis. However, conviction-basedtechniques such as those herein can be used to guide a search forknowledge, especially if combined with utility functions. Automated labexperiments may have actuators and may put different chemicals, samples,or parts in different combinations and put them under differentcircumstances. Using conviction to guide the machines enables them tohone in on learning how the system under study responds to differentscenarios, and, for example, searching areas of greatest uncertainty.Conceptually speaking, when the surprisal is combined with a valuefunction, especially in a multiplicative fashion, then the combinationis a powerful information theoretic take on the classic exploration vsexploitation trade-offs that are made in search processes fromartificial intelligence to science to engineering. Additionally, such asystem can be made to automate experiments where it can predict the mosteffective approach, homing in on the best possible, predictable outcomesfor a specific knowledge base. Further, like in the other embodimentsdiscussed herein, it could indicate (e.g., raise alarms) to humanoperators when the results are anomalous, or even tell which featuresbeing measured are most useful (so that they can be appropriatelymeasured) or when measurements are not sufficient to characterize theoutcomes. If the system has multiple kinds of sensors that have “costs”(e.g., monetary, time, computation, etc.) or cannot be all activatedsimultaneously, the feature entropies could be used to activate ordeactivate the sensors to reduce costs or improve the distinguishabilityof the experimental results.

In some embodiments, process 100 may determine (e.g., in response to arequest) the surprisal of one or more data elements or aspects of theexperiment control system. The surprisal for the one or more experimentcontrol system data elements or aspects may be determined and adetermination may be made whether to select or include the one or moreexperiment control system data elements or aspects in experiment controlcomputer-based reasoning model based on the determined surprisal. Whilethere are more sets of one or more experiment control system dataelements or aspects to assess, the process may return to determinewhether more experiment control system data elements or aspects setsshould be included. Once there are no more experiment control systemdata elements or aspects to consider, the process can turn to causing181 control of the experiment control system using the experimentcontrol computer-based reasoning model.

In some embodiments, process 100 may determine (e.g., in response to arequest) the suggested cases and explanation data for in the experimentcontrol computer-based reasoning model. Based on a determination madebased on the suggested action and/or explanation data, the process cancause 190 control of an experiment control system may be accomplished byprocess 400. For example, if the data elements are related to experimentcontrol system actions, then the experiment control computer-basedreasoning model trained on that data will control experiment controlsystem. Process 400 proceeds by receiving 410 an experiment controlcomputer-based reasoning model. The process proceeds by receiving 420 acontext. The experiment control computer-based reasoning model is thenused to determine 430 an action to take. The action is then performed bythe control system (e.g., caused by the experiment controlcomputer-based reasoning system). If there are more 450 contexts toconsider, then the system returns to receive 410 those contexts andotherwise ceases 460. In such embodiments, the experiment controlcomputer-based reasoning model may be used to control experiment. Thechosen actions are then performed by a control system.

Control of Energy Transfer Systems

The process 100 may also be applied in the context of control systemsfor energy transfer. For example, a building may have numerous energysources, including solar, wind, grid-based electrical, batteries,on-site generation (e.g., by diesel or gas), etc. and may have manyoperations it can perform, including manufacturing, computation,temperature control, etc. The techniques herein may be used to controlwhen certain types of energy are used and when certain energy consumingprocesses are engaged. For example, on sunny days, roof-mounted solarcells may provide enough low-cost power that grid-based electrical poweris discontinued during a particular time period while costlymanufacturing processes are engaged. On windy, rainy days, the overheadof running solar panels may overshadow the energy provided, but powerpurchased from a wind-generation farm may be cheap, and only essentialenergy consuming manufacturing processes and maintenance processes areperformed.

In some embodiments, process 100 may determine (e.g., in response to arequest) the surprisal of one or more data elements or aspects of theenergy transfer system. The surprisal for the one or more energytransfer system data elements or aspects may be determined and adetermination may be made whether to select or include the one or moreenergy transfer system data elements or aspects in energy controlcomputer-based reasoning model based on the determined surprisal. Whilethere are more sets of one or more energy transfer system data elementsor aspects to assess, the process may return to determine whether moreenergy transfer system data elements or aspects should be included. Oncethere are no more energy transfer system data elements or aspects toconsider, the process can turn to controlling the energy transfer systemusing the energy control computer-based reasoning model.

In some embodiments, process 100 may determine (e.g., in response to arequest) the suggested cases and explanation data for in the energytransfer computer-based reasoning model. Based on a determination madebased on the suggested action and/or explanation data, the process cancause 190 control of an energy transfer system may be accomplished byprocess 400. For example, if the data elements are related to energytransfer system actions, then the energy control computer-basedreasoning model trained on that data will control energy transfersystem. Process 400 proceeds by receiving 410 an energy controlcomputer-based reasoning model. The process proceeds by receiving 420 acontext. The energy control computer-based reasoning model is then usedto determine 430 an action to take. The action is then performed by thecontrol system (e.g., caused by the energy control computer-basedreasoning system). If there are more 450 contexts to consider, then thesystem returns to receive 410 those contexts and otherwise ceases 460.In such embodiments, the energy control computer-based reasoning modelmay be used to control energy. The chosen actions are then performed bya control system.

Example Control Hierarchies

In some embodiments, the technique herein may use a control hierarchy tocontrol systems and/or cause actions to be taken (e.g., as part ofcausing 190 control in FIG. 1). There are numerous example controlhierarchies and many types of systems to control, and hierarchy forvehicle control is presented below. In some embodiments, only a portionof this control hierarchy is used. It is also possible to add levels to(or remove levels from) the control hierarchy.

An example control hierarchy for controlling a vehicle could be:

-   -   Primitive Layer—Active vehicle abilities (accelerate,        decelerate), lateral, elevation, and orientation movements to        control basic vehicle navigation Behavior Layer—Programmed        vehicle behaviors which prioritize received actions and        directives and prioritize the behaviors in the action.    -   Unit Layer—Receives orders from command layer, issues        moves/directives to the behavior layer.    -   Command Layers (hierarchical)—Receives orders and gives orders        to elements under its command, which may be another command        layer or unit layer.

Example Cases, Data Elements, Contexts, and Operational Situations

In some embodiments, the cases or data elements may include context dataand action data in context-action pairs. Further, cases may relate tocontrol of a vehicle. For example, context data may include data relatedto the operation of the vehicle, including the environment in which itis operating, and the actions taken may be of any granularity. Consideran example of data collected while a driver, Alicia, drives around acity. The collected data could be context and action data where theactions taken can include high-level actions (e.g., drive to nextintersection, exit the highway, take surface roads, etc.), mid-levelactions (e.g., turn left, turn right, change lanes) and/or low-levelactions (e.g., accelerate, decelerate, etc.). The contexts can includeany information related to the vehicle (e.g. time until impact withclosest object(s), speed, course heading, breaking distances, vehicleweight, etc.), the driver (pupillary dilation, heart rate,attentiveness, hand position, foot position, etc.), the environment(speed limit and other local rules of the road, weather, visibility,road surface information, both transient such as moisture level as wellas more permanent, such as pavement levelness, existence of potholes,etc.), traffic (congestion, time to a waypoint, time to destination,availability of alternate routes, etc.), and the like. These input data(e.g., context-action pairs for training a context-based reasoningsystem or input training contexts with outcome actions for training amachine learning system) can be saved and later used to help control acompatible vehicle in a compatible operational situation. Theoperational situation of the vehicle may include any relevant datarelated to the operation of the vehicle. In some embodiments, theoperational situation may relate to operation of vehicles by particularindividuals, in particular geographies, at particular times, and inparticular conditions. For example, the operational situation may referto a particular driver (e.g., Alicia or Carole). Alicia may beconsidered a cautious car driver, and Carole a faster driver. As notedabove, and in particular, when approaching a stop sign, Carole may coastin and then brake at the last moment, while Alicia may slow down earlierand roll in. As another example of an operational situation, Bob may beconsidered the “best pilot” for a fleet of helicopters, and thereforehis context and actions may be used for controlling self-flyinghelicopters.

In some embodiments, the operational situation may relate to the localein which the vehicle is operating. The locale may be a geographic areaof any size or type, and may be determined by systems that utilizemachine learning. For example, an operational situation may be “highwaydriving” while another is “side street driving”. An operationalsituation may be related to an area, neighborhood, city, region, state,country, etc. For example, one operational situation may relate todriving in Raleigh, N.C. and another may be driving in Pittsburgh, Pa.An operational situation may relate to safe or legal driving speeds. Forexample, one operational situation may be related to roads withforty-five miles per hour speed limits, and another may relate to turnswith a recommended speed of 20 miles per hour. The operational situationmay also include aspects of the environment such as road congestion,weather or road conditions, time of day, etc. The operational situationmay also include passenger information, such as whether to hurry (e.g.,drive faster), whether to drive smoothly, technique for approaching stopsigns, red lights, other objects, what relative velocity to take turns,etc. The operational situation may also include cargo information, suchas weight, hazardousness, value, fragility of the cargo, temperaturesensitivity, handling instructions, etc.

In some embodiments, the context and action may include vehiclemaintenance information. The context may include information for timingand/or wear-related information for individual or sets of components.For example, the context may include information on the timing anddistance since the last change of each fluid, each belt, each tire (andpossibly when each was rotated), the electrical system, interior andexterior materials (such as exterior paint, interior cushions, passengerentertainment systems, etc.), communication systems, sensors (such asspeed sensors, tire pressure monitors, fuel gauges, compasses, globalpositioning systems (GPS), RADARs, LiDARs, cameras, barometers, thermalsensors, accelerometers, strain gauges, noise/sound measurement systems,etc.), the engine(s), structural components of the vehicle (wings,blades, struts, shocks, frame, hull, etc.), and the like. The actiontaken may include inspection, preventative maintenance, and/or a failureof any of these components. As discussed elsewhere herein, havingcontext and actions related to maintenance may allow the techniques topredict when issues will occur with future vehicles and/or suggestmaintenance. For example, the context of an automobile may include thedistance traveled since the timing belt was last replaced. The actionassociated with the context may include inspection, preventativereplacement, and/or failure of the timing belt. Further, as describedelsewhere herein, the contexts and actions may be collected for multipleoperators and/or vehicles. As such, the timing of inspection,preventative maintenance and/or failure for multiple automobiles may bedetermined and later used for predictions and messaging.

Causing performance of an identified action can include sending a signalto a real car, to a simulator of a car, to a system or device incommunication with either, etc. Further, the action to be caused can besimulated/predicted without showing graphics, etc. For example, thetechniques might cause performance of actions in the manner thatincludes, determining what action would be take, and determining whetherthat result would be anomalous, and performing the techniques hereinbased on the determination that such state would be anomalous based onthat determination, all without actually generating the graphics andother characteristics needed for displaying the results needed in agraphical simulator (e.g., a graphical simulator might be similar to acomputer game).

Example of Certainty and Conviction

In some embodiments, certainty score is a broad term encompassing itplain and ordinary meaning, including the certainty (e.g., as acertainty function) that a particular set of data fits a model, theconfidence that a particular set of data conforms to the model, or theimportance of a feature or case with regard to the model. Determining acertainty score for a particular case can be accomplished by removingthe particular case from the case-based or computer-based reasoningmodel and determining the conviction score of the particular case basedon an entropy measure associated with adding that particular case backinto the model. Any appropriate entropy measure, variance, confidence,and/or related method can be used for making this determination, such asthe ones described herein. In some embodiments, certainty or convictionis determined by the expected information gain of adding the case to themodel divided by the actual information gain of adding the case. Forexample, in some embodiments, certainty or conviction may be determinedbased on Shannon Entropy, Rényi entropy, Hartley entropy, min entropy,Collision entropy, Rényi divergence, diversity index, Simpson index,Gini coefficient, Kullback-Leibler divergence, Fisher information,Jensen-Shannon divergence, Symmetrised divergence. In some embodiments,certainty scores are conviction scores and are determined by calculatingthe entropy, comparing the ratio of entropies, and/or the like.

In some embodiments, the conviction of a case may be computed based onlooking only at the K nearest neighbors when adding the feature backinto the model. The K nearest neighbors can be determined using anyappropriate distance measure, including use of Euclidean distance,1—Kronecker delta, Minkowski distance, Damerau-Levenshtein distance,and/or any other distance measure, metric, pseudometric, premetric,index, or the like. In some embodiments, influence functions are used todetermine the importance of a feature or case.

In some embodiments, determining certainty or conviction scores caninclude determining the conviction of each feature of multiple featuresof the cases in the computer-based reasoning model. In this context theword “feature” is being used to describe a data field as across all orsome of the cases in the computer-based reasoning model. The word“field,” in this context, is being used to describe the value of anindividual case for a particular feature. For example, a feature for atheoretical computer-based reasoning model for self-driving cars may be“speed”. The field value for a particular case for the feature of speedmay be the actual speed, such as thirty five miles per hour.

Returning to determining certainty or conviction scores, in someembodiments, determining the conviction of a feature may be accomplishedby removing the feature from the computer-based reasoning model anddetermining a conviction score of the feature based on an entropymeasure associated with adding the feature back into the computer-basedreasoning model. For example, returning to the example above, removing aspeed feature from a self-driving car computer-based reasoning modelcould include removing all of the speed values (e.g., fields) from casesfrom the computer-based reasoning model and determining the convictionof adding speed back into the computer-based reasoning model. Theentropy measure used to determine the conviction score for the featurecan be any appropriate entropy measure, such as those discussed herein.In some embodiments, the conviction of a feature may also be computedbased on looking only at the K nearest neighbors when adding the featureback into the model. In some embodiments, the feature is not actuallyremoved, but only temporarily excluded.

Hardware Overview

According to some embodiments, the techniques described herein areimplemented by one or more special-purpose computing devices. Thespecial-purpose computing devices may be hard-wired to perform thetechniques, or may include digital electronic devices such as one ormore application-specific integrated circuits (ASICs) or fieldprogrammable gate arrays (FPGAs) that are persistently programmed toperform the techniques, or may include one or more general purposehardware processors programmed to perform the techniques pursuant toprogram instructions in firmware, memory, other storage, or acombination. Such special-purpose computing devices may also combinecustom hard-wired logic, ASICs, or FPGAs with custom programming toaccomplish the techniques. The special-purpose computing devices may bedesktop computer systems, portable computer systems, handheld devices,networking devices or any other device that incorporates hard-wiredand/or program logic to implement the techniques.

For example, FIG. 3 is a block diagram that illustrates a computersystem 300 upon which an embodiment of the invention may be implemented.Computer system 300 includes a bus 302 or other communication mechanismfor communicating information, and a hardware processor 304 coupled withbus 302 for processing information. Hardware processor 304 may be, forexample, a general purpose microprocessor.

Computer system 300 also includes a main memory 306, such as a randomaccess memory (RAM) or other dynamic storage device, coupled to bus 302for storing information and instructions to be executed by processor304. Main memory 306 also may be used for storing temporary variables orother intermediate information during execution of instructions to beexecuted by processor 304. Such instructions, when stored innon-transitory storage media accessible to processor 304, rendercomputer system 300 into a special-purpose machine that is customized toperform the operations specified in the instructions.

Computer system 300 further includes a read only memory (ROM) 308 orother static storage device coupled to bus 302 for storing staticinformation and instructions for processor 304. A storage device 310,such as a magnetic disk, optical disk, or solid-state drive is providedand coupled to bus 302 for storing information and instructions.

Computer system 300 may be coupled via bus 302 to a display 312, such asan OLED, LED or cathode ray tube (CRT), for displaying information to acomputer user. An input device 314, including alphanumeric and otherkeys, is coupled to bus 302 for communicating information and commandselections to processor 304. Another type of user input device is cursorcontrol 316, such as a mouse, a trackball, or cursor direction keys forcommunicating direction information and command selections to processor304 and for controlling cursor movement on display 312. This inputdevice typically has two degrees of freedom in two axes, a first axis(e.g., x) and a second axis (e.g., y), that allows the device to specifypositions in a plane. The input device 314 may also have multiple inputmodalities, such as multiple 2-axes controllers, and/or input buttons orkeyboard. This allows a user to input along more than two dimensionssimultaneously and/or control the input of more than one type of action.

Computer system 300 may implement the techniques described herein usingcustomized hard-wired logic, one or more ASICs or FPGAs, firmware and/orprogram logic which in combination with the computer system causes orprograms computer system 300 to be a special-purpose machine. Accordingto some embodiments, the techniques herein are performed by computersystem 300 in response to processor 304 executing one or more sequencesof one or more instructions contained in main memory 306. Suchinstructions may be read into main memory 306 from another storagemedium, such as storage device 310. Execution of the sequences ofinstructions contained in main memory 306 causes processor 304 toperform the process steps described herein. In alternative embodiments,hard-wired circuitry may be used in place of or in combination withsoftware instructions.

The term “storage media” as used herein refers to any non-transitorymedia that store data and/or instructions that cause a machine tooperate in a specific fashion. Such storage media may comprisenon-volatile media and/or volatile media. Non-volatile media includes,for example, optical disks, magnetic disks, or solid-state drives, suchas storage device 310. Volatile media includes dynamic memory, such asmain memory 306. Common forms of storage media include, for example, afloppy disk, a flexible disk, hard disk, solid-state drive, magnetictape, or any other magnetic data storage medium, a CD-ROM, any otheroptical data storage medium, any physical medium with patterns of holes,a RAM, a PROM, and EPROM, a FLASH-EPROM, NVRAM, any other memory chip orcartridge.

Storage media is distinct from but may be used in conjunction withtransmission media. Transmission media participates in transferringinformation between storage media. For example, transmission mediaincludes coaxial cables, copper wire and fiber optics, including thewires that comprise bus 302. Transmission media can also take the formof acoustic or light waves, such as those generated during radio-waveand infra-red data communications.

Various forms of media may be involved in carrying one or more sequencesof one or more instructions to processor 304 for execution. For example,the instructions may initially be carried on a magnetic disk orsolid-state drive of a remote computer. The remote computer can load theinstructions into its dynamic memory and send the instructions over atelephone line using a modem. A modem local to computer system 300 canreceive the data on the telephone line and use an infra-red transmitterto convert the data to an infra-red signal. An infra-red detector canreceive the data carried in the infra-red signal and appropriatecircuitry can place the data on bus 302. Bus 302 carries the data tomain memory 306, from which processor 304 retrieves and executes theinstructions. The instructions received by main memory 306 mayoptionally be stored on storage device 310 either before or afterexecution by processor 304.

Computer system 300 also includes a communication interface 318 coupledto bus 302. Communication interface 318 provides a two-way datacommunication coupling to a network link 320 that is connected to alocal network 322. For example, communication interface 318 may be anintegrated services digital network (ISDN) card, cable modem, satellitemodem, or a modem to provide a data communication connection to acorresponding type of telephone line. As another example, communicationinterface 318 may be a local area network (LAN) card to provide a datacommunication connection to a compatible LAN. Wireless links may also beimplemented. In any such implementation, communication interface 318sends and receives electrical, electromagnetic or optical signals thatcarry digital data streams representing various types of information.Such a wireless link could be a Bluetooth, Bluetooth Low Energy (BLE),802.11 WiFi connection, or the like.

Network link 320 typically provides data communication through one ormore networks to other data devices. For example, network link 320 mayprovide a connection through local network 322 to a host computer 324 orto data equipment operated by an Internet Service Provider (ISP) 326.ISP 326 in turn provides data communication services through the worldwide packet data communication network now commonly referred to as the“Internet” 328. Local network 322 and Internet 328 both use electrical,electromagnetic or optical signals that carry digital data streams. Thesignals through the various networks and the signals on network link 320and through communication interface 318, which carry the digital data toand from computer system 300, are example forms of transmission media.

Computer system 300 can send messages and receive data, includingprogram code, through the network(s), network link 320 and communicationinterface 318. In the Internet example, a server 330 might transmit arequested code for an application program through Internet 328, ISP 326,local network 322 and communication interface 318.

The received code may be executed by processor 304 as it is received,and/or stored in storage device 310, or other non-volatile storage forlater execution.

In the foregoing specification, embodiments of the invention have beendescribed with reference to numerous specific details that may vary fromimplementation to implementation. The specification and drawings are,accordingly, to be regarded in an illustrative rather than a restrictivesense. The sole and exclusive indicator of the scope of the invention,and what is intended by the applicants to be the scope of the invention,is the literal and equivalent scope of the set of claims that issue fromthis application, in the specific form in which such claims issue,including any subsequent correction.

What is claimed is:
 1. A method comprising: receiving a request for asuggested action based on an input context, in a case-based reasoningsystem, wherein the case-based reasoning system includes a case-basedreasoning model; determining one or more candidate cases based on theinput context in the case-based reasoning system and by excluding caseswithin a case region containing the input context and determining, asthe one or more candidate cases, one or more particular cases mostsimilar to the input context, and wherein the one or more candidatecases include respective one or more candidate actions, wherein thecases that are most similar are determined based on premetric measuringfrom the input context to the one or more particular cases; determiningthe suggested action based on the one or more candidate actions;determining a distance measure from the input context to the one or morecandidate cases, wherein determining the distance measure comprisesmaximizing a ratio of: a function of distance from actions associatedwith the one or more candidate cases to the suggested action in actionspace, and a function of distance from actions and contexts associatedwith the one or more candidate cases to the input context inaction+context space; responding to the request for suggested actionwith the suggested action and the distance measure; when the distancemeasure from the input context to the one or more candidate cases iswithin a certain threshold, causing control of a controllable systembased on the suggested action; when the distance measure from the inputcontext to the one or more candidate cases is beyond the certainthreshold: determining one or more explanation factors for the suggestedaction determined based at least in part on the input context; providingthe one or more explanation factors in response to the request for thesuggested action; wherein the method is performed by one or morecomputing devices.
 2. The method of claim 1, wherein the input contextis a current context for an image labeling system during operation ofthe image labeling system, the suggested action is a suggestedlabelling, and causing performance of the suggested action comprisescausing the suggested labeling to be performed by the image labelingsystem.
 3. The method of claim 1, wherein the input context is a currentcontext for a self-driving car during operation of the self-driving car,and causing performance of the suggested action comprises causing thesuggested action to be performed by the self-driving car.
 4. The methodof claim 1, wherein excluding cases within the case region containingthe input context comprises excluding cases within the case regiondefined that are most similar to the input context, wherein cases thatare most similar are determined based on a distance premetric from theinput context to the one or more candidate cases.
 5. The method of claim1, further comprising determining the case region based at least in parton determining the cases that are most similar to the input context,wherein the cases that are most similar are determined based on adistance premetric from the input context to the cases.
 6. The method ofclaim 1, further comprising determining the case region based at leastin part on a suggested case associated with the suggested action.
 7. Themethod of claim 1, further comprising determining the case region basedat least in part on a number of cases that are most similar to the inputcontext or a suggested case associated with the suggested action,wherein the cases that are most similar are determined based on adistance premetric from the input context to the cases.
 8. The method ofclaim 1, further comprising determining the case region based at leastin part on a density function.
 9. A system for performing amachine-executed operation involving instructions, wherein saidinstructions are instructions which, when executed by one or morecomputing devices, cause performance of a process comprising: receivinga request for a suggested action based on an input context, in acase-based reasoning system, wherein the case-based reasoning systemincludes a case-based reasoning model; determining one or more candidatecases based on the input context in the case-based reasoning system bydetermining the one or more candidate cases based on distance of the oneor more candidate cases to the input context, wherein the one or morecandidate cases include respective one or more candidate actions;determining the suggested action based on the one or more candidateactions; determining one or more counterfactual cases based on thesuggested action and the input context, wherein determining the one ormore counterfactual cases comprises determining one or more cases thatmaximize a ratio of: a function of distance from actions associated withthe one or more counterfactual cases to the suggested action in actionspace, and a function of distance from actions and contexts associatedwith the one or more counterfactual cases to the input context inaction+context space; responding to the request for suggested actionwith the suggested action and the one or more counterfactual cases; whena distance from the input context to the one or more counterfactualcases is beyond a certain threshold, causing control of a controllablesystem based on the suggested action; when the distance from the inputcontext to the one or more counterfactual cases is not beyond thecertain threshold: determining one or more explanation factors for thesuggested action determined based at least in part on the input context;providing the one or more explanation factors in response to the requestfor the suggested action.
 10. The system of claim 9, wherein the inputcontext is a current context for an image labeling system duringoperation of the image labeling system, the suggested action is asuggested labelling, and causing performance of the suggested actioncomprises causing the suggested labeling to be performed by the imagelabeling system.
 11. The system of claim 9, wherein the input context isa current context for a self-driving car during operation of theself-driving car, and causing performance of the suggested actioncomprises causing the suggested action to be performed by theself-driving car.
 12. The system of claim 9, wherein determining the oneor more counterfactual cases comprises: determining one or more caseswith actions different from the suggested action that are most similarto the input context as the one or more counterfactual cases, whereinthe cases that are most similar are determined based on premetricmeasuring from the input context to the one or more counterfactualcases.
 13. The system of claim 9, wherein determining the one or morecounterfactual cases comprises: determining one or more cases thatmaximize a ratio of: a function of distance from actions associated withthe one or more counterfactual cases to the suggested action in actionspace, and a function of distance from contexts associated with the oneor more counterfactual cases to the input context in context space. 14.The system of claim 9, wherein determining the one or morecounterfactual cases comprises: determining one or more cases thatmaximize a ratio of: a logistic function of distance from actionsassociated with the one or more counterfactual cases to the suggestedaction in action space, and a logistic function of distance from actionsand contexts associated with the one or more counterfactual cases to theinput context in context space.
 15. A non-transitory computer readablemedium storing instructions which, when executed by one or morecomputing devices, cause the one or more computing devices to perform aprocess of: receiving a request for a suggested action based on an inputcontext, in a case-based reasoning system, wherein the case-basedreasoning system includes a case-based reasoning model; determining oneor more candidate cases based on the input context in the case-basedreasoning system by determining the one or more candidate cases based ondistance of the one or more candidate cases to the input context,wherein the one or more candidate cases include one or more respectivecandidate actions; determining the suggested action based on the one ormore candidate cases; determining one or more archetype cases based onthe suggested action, wherein determining the one or more archetypecases comprises determining one or more cases that maximize a ratio of:a function of distance from actions associated with the one or morearchetype cases to the suggested action in action space, and a functionof distance from actions and contexts associated with the one or morearchetype cases to the input context in action+context space; respondingto the request for suggested action with the suggested action and theone or more archetype cases; when a distance from the input context tothe one or more archetype cases is within a certain threshold, causingcontrol of a controllable system based on the suggested action; when thedistance from the input context to the one or more archetype cases isbeyond the certain threshold: determining one or more explanationfactors for the suggested action determined based at least in part onthe input context; providing the one or more explanation factors inresponse to the request for the suggested action.
 16. The non-transitorycomputer readable medium of claim 15, wherein the input context is acurrent context for an image labeling system during operation of theimage labeling system, the suggested action is a suggested labelling,and causing performance of the suggested action comprises causing thesuggested labeling to be performed by the image labeling system.
 17. Thenon-transitory computer readable medium of claim 15, wherein the inputcontext is a current context for a self-driving car during operation ofthe self-driving car, and causing performance of the suggested actioncomprises causing the suggested action to be performed by theself-driving car.
 18. The non-transitory computer readable medium ofclaim 15, wherein determining the one or more archetype cases comprises:determining a first set of cases with identical actions to the suggestedaction and a second set of cases with actions different from thesuggested action; determining the one or more archetype cases as a casein the first set of cases that is farthest from cases in the second setof cases.